﻿@{
    ViewBag.Title = "ConvertXmlDemo1";
    Layout = "~/Views/Shared/_Page.cshtml";
}

<h2>Convert Xml Demo 1</h2>

<br />
<h3>Employee Info:</h3>
<hr />
<h3 id="empName"></h3>
<h3 id="empTitle"></h3>
<h3 id="empAge"></h3>

<script type="text/javascript">
    $(document).ready(function () {
        var xml = '<Employee><Name>David</Name><Title>Senior Developer</Title>'
                + '<Age>33</Age></Employee>';
        var name = $.xmlDOM(xml).find('Employee > Name').text();
        var title = $.xmlDOM(xml).find('Employee > Title').text();
        var age = $.xmlDOM(xml).find('Employee > Age').text();

        $('#empName').html(name);
        $('#empTitle').html(title);
        $('#empAge').html(age);
    });
</script>

